package structural.flyweight.commixture;

import java.util.ArrayList;
import java.util.List;

public class Test {

    public static void main(String[] args) {
        List<String> listType = new ArrayList<String>();
        listType.add("剪刀");
        listType.add("螺丝刀");
        listType.add("扳手");
        listType.add("剪刀");
        listType.add("扳手");
        CommixtureTool pCommixtureTool1 = ToolFactory.getInstance().getCommixtureTool(listType);
        CommixtureTool pCommixtureTool2 = ToolFactory.getInstance().getCommixtureTool(listType);

        pCommixtureTool1.operate("复杂结构");
        pCommixtureTool2.operate("复杂结构");
        System.out.println("pCommixtureTool1 == pCommixtureTool2 ? " + (pCommixtureTool1 == pCommixtureTool2));
    }

}
